package com.kkb.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Controller
@RequestMapping("pages")
public class LogoutController {


    @RequestMapping(value = "logout",method = RequestMethod.POST)
    public void logout(HttpServletRequest request, HttpServletResponse response){
        //销毁session
        request.getSession().invalidate();

    }

}
